<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>保持页面最底部</title>
  <style>
    html {
      height: 100%;
    }

    body {
      position: relative;
      margin: 0;
      padding: 0;
      min-height: 100%;
      box-sizing: border-box;
      padding-bottom: 40px;
    }

    footer {
      position: absolute;
      bottom: 0;
      left: 0;
      width: 100%;

      height: 36px;
      background: #666;
      color: #fff;
      text-align: center;
      line-height: 36px;
    }

    section {
      background: orangered;
      width: 160px;
      height: 80px;
    }
  </style>
</head>
<body>
<section>
</section>

<footer>
  this is footer
</footer>
</body>
</html>